/*
 * Copyright (c) 2021 Futurewei Technologies, Inc.
 *
 * clang2mpl is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PSL v2. You may obtain a copy of Mulan PSL v2 at:
 *
 *     http://license.coscl.org.cn/MulanPSL2
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
 * KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the
 * Mulan PSL v2 for more details.
 */
// RUN: %clang2mpl --ascii --verify %s -- --target=aarch64-linux-elf
// RUN: cat %m | %FileCheck %s

// CHECK: asmdecl ".globl stop_set_test_set"
asm(".globl stop_set_test_set");

// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $c u8
char c;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $uc u8
unsigned char uc;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $s i16
short s;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $us u16
unsigned short us;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $i i32
int i;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $ui u32
unsigned int ui;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $l i64
long l;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $ul u64
unsigned long ul;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $ll i64
long long ll;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $ull u64
unsigned long long ull;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $str <* u8>
char *str;
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $a1 <[3] i32>
int a1[3];
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $a2 <[6][31] i16>
short a2[6][31];
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $ia extern <[1][2] u8>
extern char ia[][2];
// CHECK: LOC 2 [[# @LINE + 2 ]]{{$}}
// CHECK-NEXT: var $init_data i32 section ( "INITDATA" ) = 0
int init_data __attribute__ ((section ("INITDATA"))) = 0;
